package com.dyna.structural.adapter;

public class MoviePlayerAdpater extends Zh_JPTranslator implements Player{

    /**
     * 实现Player拥有播放功能
     * 通过构造器将翻译功能注入进来
     * @return
     */

    private MoviesPlayer target;

    public MoviePlayerAdpater(MoviesPlayer target) {
        this.target = target;
    }

    @Override
    public String play() {
        String play = target.play();
        String translation = translation(play);
        System.out.println(translation);
        return translation;
    }
}
